import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import CreateVideo from '../views/Createvideo.vue'
import VideoList from '../views/VideoList.vue'
import CreatePPT from '../views/Createppt.vue'
import QuestionGenerator from '../views/QuestionGenerator.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/question-generator',
      name: 'question-generator',
      component: QuestionGenerator
    },
    {
      path: '/home',
      name: 'home',
      component: Home
    },
    {
      path: '/create_video',
      name: 'create-video',
      component: CreateVideo
    },
    {
      path: '/create-ppt',
      name: 'create-ppt',
      component: CreatePPT
    },
    {
      path: '/videos',
      name: 'videos',
      component: VideoList
    },
    {
      path: '/question-generator',
      name: 'question-generator',
      component: () => import('@/views/QuestionGenerator.vue')
    }
  ]
})

export default router
